home *** CD-ROM | disk | FTP | other *** search
- Path: news.uni-jena.de!news
- From: mkt@isun04.inf.uni-jena.de (Tilo Koerbs)
- Newsgroups: comp.lang.c++
- Subject: Re: Const Problem - Help Needed
- Date: 30 Jan 1996 12:39:24 GMT
- Organization: Lehrstuhl fuer Rechnerarchitektur- und kommunikation, FSU Jena
- Message-ID: <4el3hs$357@fsuj01.rz.uni-jena.de>
- References: <1995Oct11.021258.1736@news.wrc.xerox.com>
- Reply-To: mkt@isun04.inf.uni-jena.de
- NNTP-Posting-Host: isun15.inf.uni-jena.de
-
- At first: your const member is not a const member!
- If it is changed by the server it is clearly a changeable,
- non const, member.
- Otherwise, you can let the server return a new struct,
- but I think it is passed via pointer or reference!
- The simplest solution is to cast the const away:
- const int i = 0;
- i = 1; // error: i is const.
- (int&)i = 1; // perfect!
-
- But be sure that there is no other solution!
-
- Send an e-Mail if this is not what you want, I try to help!
-
-
-
-